// 临时用于添加内城建筑

using System;
using UnityEngine;

namespace Yoozoo.Modules.InnerCity
{
    public static class CityUtils
    {

        public static Action<string, int, int,Vector3> AddBuildingEvent;
        public static Action<int, int> RemoveBuildingEvent;
        
        // DEBUG
        public static Func<int, int, Transform> GetBuildingFunc;
        
        public static void AddBuildingPrefab(string prefabPath,int buildingId,int bIndex,Vector3 pos)
        {
            //Debug.LogError(prefabPath+buildingId+bIndex+pos.x+pos.y+pos.z);
            AddBuildingEvent?.Invoke(prefabPath,buildingId,bIndex,pos);
        }

        public static void RemoveBuildingPrefab(int buildingId, int bIndex)
        {
            RemoveBuildingEvent?.Invoke(buildingId,bIndex);
        }


        public static Transform GetBuilding(int buildingId, int bIndex)
        {
            return GetBuildingFunc.Invoke(buildingId, bIndex);
        }
        
    }
}